package com.vcredit.creditcat.manager;

import java.util.List;

import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.vcredit.creditcat.api.task.ISpeedloanTaskManager;
import com.vcredit.creditcat.model.ProcessSpecialCust;

@Component
public class SpeedloanManager {

	@Reference(version = "1.0")
	private ISpeedloanTaskManager speedloanTask2Manager;
	
	public void handleSpeedloan(ProcessSpecialCust processSpecialCust)throws Exception {		
		speedloanTask2Manager.handleSpeedloan(processSpecialCust);
	}
	
	public List<ProcessSpecialCust> find()throws Exception {		
		return speedloanTask2Manager.find(new ProcessSpecialCust(null,null,1,null));
	}

	/**
	 * 通过流程ID查询当前流程未提交数据列表
	 * @param specialId
	 * @return
	 * @throws Exception
	 */
	public List<ProcessSpecialCust> findBySpecialId(Long specialId)throws Exception {
		return speedloanTask2Manager.find(new ProcessSpecialCust(specialId,null,1,null));
	}
}
